package demo;

/**
 * Created with IntelliJ IDEA.
 * Description:内部类
 * User: LianBao
 * Date: 2024-03-13
 * Time: 20:07
 */

class Outer {
    public int data1 = 1;
    private int data2 = 2;
    public int data3 = 3;
    public int data4 = 4;

    public void funOuter() {
        System.out.println("funOuter::");
    }


    class Inner {
        public int data1 = 11;
        public int data2 = 22;
        public int data5 = 5;
        public int data6 = 6;

        public void funInner() {
            System.out.println("funInner::");
        }
    }


}

public class Test1 {

    public static void main(String[] args) {
        Outer outer = new Outer();
        System.out.println(outer.data1);
    }

}
